package com.yzy.yzy_crm.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yzy.yzy_crm.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yzy.yzy_crm.entity.VoUtils;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2020-03-24
 */
@Repository
public interface UserMapper extends BaseMapper<User> {
    /*通过名字查询用户*/
    User selectUserByName(String username);
    /*查询所有的表的数据*/
    Page selectAllTbale(Page p);
    /*查询辅助类*/
    Page selectVoUtils(Page p);
    /*查询表最后一条数据*/
    User selectUserLast();
    /*查询用户角色依赖表*/
    Page selectUserRole(Page p);

    Page selectDepartment(Page p);

    /*Page selectPermission(Page p);*/
    Page selectPermission(Page p);

    int selectcount();
}
